<?php
$redisClient = new \Swoole\Redis;
$redisClient->connect('127.0.0.1', 6379, function($redisClient, bool $result){
    if(!$result){
        echo "connected failed \n";
        return;
    }
    $redisClient->set("wife","Chen Yuuuuu",function($redisClient,$result){
        var_dump($result);
    });
    $redisClient->close();
});
